Skip to content

Add IP/OP/Emergency Encounter Count documentation for SSMM#100

Open
sonzsara wants to merge 3 commits into
mainfrom
ENG-320
Open

Add IP/OP/Emergency Encounter Count documentation for SSMM#100
sonzsara wants to merge 3 commits into
mainfrom
ENG-320

Conversation

@sonzsara
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Markdown query documentation page for the SSMM operational dashboard question covering daily month-to-date (through yesterday) IP bed occupancy, OP encounters, and Emergency encounters.

Changes:

  • Added Care/Encounter/ip_op_emer_encounter_count_ssmm.md documenting the dashboard purpose, date window, and SQL query.
  • Implemented SQL CTEs to generate a day series, compute daily occupied beds, and aggregate OP/Emergency volumes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Care/Encounter/ip_op_emer_encounter_count_ssmm.md
Comment on lines +89 to +91


`````
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

AND fl.parent_id NOT IN (19, 44)
AND fle.deleted = FALSE
AND fle.start_datetime::date <= d.report_date
AND (fle.end_datetime IS NULL OR fle.end_datetime::date > d.report_date)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If discharge_date is same as report_date, should bed be counted as occupying for that day or no?

FROM emr_facilitylocationencounter fle
INNER JOIN emr_facilitylocation fl ON fle.location_id = fl.id
INNER JOIN emr_encounter e ON fle.encounter_id = e.id
WHERE fl.deleted = FALSE
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed filtering out deleted encounters?

@@ -0,0 +1,91 @@

# IP / OP / Emergency Encounter Count - SSMM
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encounter count or Patient count? Since you're doingDISTINCT patient_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants